package com.utooo.scheduled;

import com.utooo.service.purchase.ContractSettlementReportService;
import com.utooo.service.supplier.PurchaseExecutionService;
import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class PurchaseReportTask {

    private final PurchaseExecutionService purchaseExecutionServiceImpl;
    private final ContractSettlementReportService contractSettlementReportServiceImpl;
    /**
     * 采购执行报表
     */
//    @Scheduled(cron = "0 */5 * * * ?") //
    public void executeOrderExecution() {
        // 抽取订单相关数据
        purchaseExecutionServiceImpl.executeOrderExecution();
    }
//    @Scheduled(cron = "0 */5 * * * ?") //
    public void executeOrderSettlement() {
        // 抽取订单相关数据
        purchaseExecutionServiceImpl.executeOrderSettlement();
    }
//    @Scheduled(cron = "0 */5 * * * ?") //
    public void executeContractSettlement() {
        // 抽取合同结算
        contractSettlementReportServiceImpl.executeContractSettlement();
    }

}